package com.yc.cinema;

import org.springframework.stereotype.Component;

// 组件组件默认命名是  类名 + 首字母消息 USB => uSB
@Component("usb")
public class USB implements Storage{
    private Object data;

    @Override
    public void save(Object data) {
        System.out.println("保存数据到U盘: " + data);
        this.data = data;
    }

    @Override
    public Object load() {
        return data;
    }
}
